package cn.starrysky108.simpleerp.user.entity;

import cn.starrysky108.simpleerp.core.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.math.BigDecimal;

/**
 * <p>
 * 用户钱包
 * </p>
 *
 * @author Carl Lee
 * @since 2021-08-14
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("user_wallet")
@ApiModel(value = "UserWallet对象", description = "用户钱包")
public class UserWallet extends BaseEntity {

    private static final long serialVersionUID = 1L;


    @ApiModelProperty(value = "用户id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "钱包总收入额")
    @TableField("income")
    private BigDecimal income;

    @ApiModelProperty(value = "钱包总支出额")
    @TableField("outcome")
    private BigDecimal outcome;

    @ApiModelProperty(value = "冻结金额")
    @TableField("amount_frozen")
    private BigDecimal amountFrozen;

    @ApiModelProperty(value = "余额")
    @TableField("balance")
    private BigDecimal balance;

    @ApiModelProperty(value = "是否安全，默认true")
    @TableField("is_safe")
    private Boolean isSafe;

    @ApiModelProperty(value = "是否被锁定，默认false")
    @TableField("is_lock")
    private Boolean isLock;


}
